<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <style>
        *{
            margin:0;
            padding: 0;
        }
        body{
            width: 100%;
            height: 100%;
            background-color: black;
        }
        #box{
            width: 100%;
            height: 827px;
            /*background-color: black;*/
            overflow:hidden;
        }
        span{
            font-size:10px;
            color: #07C160;
            float:left;
            width: 10px;
            margin-left:3px ;
        }
        .div{
            position: absolute;

            display: inline-block;
            float: left;
        }
    </style>
    <body>
    <div id="box">

    </div>
    <script src="jquery.min.js"></script>
    <script>
        //随机数字
        function random_num(min,max) {
            return Math.floor(Math.random()*max)+min
        }
        var set_value = setInterval(
            function () {
                var div =$("<div class='div'></div>");
                console.log(div);
                var num=random_num(1,9);
                div.text(num);
                div.css({"fontSize":random_num(30,80)+"px",
                        'left': random_num(10, window.innerWidth-100) + 'px',
                        "top":"0px"
                });

                $("#box").append(div);
            },100
        );
        //数字下滑
        var mov = setInterval(
            function () {
                var div_list = $(".div");
                div_list.animate({top:'+=10px'},30);
                div_list.each(function () {
                    if(parseInt($(this).css("top"))>= window.innerHeight-100){
                        $(this).remove();}})});
        //颜色闪烁
        var flag = true;
        var green = 100;
        var color_interval = setInterval(function () {
            if (flag) {
                green += 3;
                if (green >= 255) {
                    flag = false;
                }
            } else {
                green -= 3;
                if (green <= 100) {
                    flag = true;
                }
            }
            $(".div").css('color', 'rgb(31,' + green + ',80)');
        }, 50)

    </script>
    </body>
</html>